<?
	include("includes/config.php");
	include("includes/login.php");
	include("includes/functions.php");
	
	
	
	
?>
<html>
	<head>
		<link rel="stylesheet" type="text/css" href="css/style.css" />
	</head>
	<body>
		<div id="header"><h1> <? echo detaliFirma('nume_firma'); ?></h1></div>
		<div id="warper">
			<?
				$resMeniu = mysql_query("select * from meniu");
			?>
			<div id="menu">
				<ul>
					<? while($rowMen = mysql_fetch_array($resMeniu)): ?>
					<li><a href="<?echo $rowMen['link'];?>"><? echo $rowMen['numeLink']; ?></a></li>
					<? endwhile; ?>
				</ul>
			</div>
			<div id="content">
				<div id="contentWrap">
					<div id="submeniu_facturi" class="block">
						<a class="buton" href="/facturi.php">Facturi Deschise</a>&nbsp; <a href="facturi_incheiate.php" class="buton">Facturi Incheiate</a>
					</div>
					
					<table>
						<tr id="capTabel">
							<td >Sereie/Nr. Factura</td>
							<td>Client</td>
							<td>Nr. Inmatrc.</td>
							<td>Data Facura</td>
							<td>Editeaza Factura</td>
						</tr>
						<?
								$resfact = mysql_query("select * from facturi where status_factura = 'incheiata' ");
								while($rowfact = mysql_fetch_array($resfact)):
						?>
						<tr >
							<td ><? echo $rowfact['serie']. $rowfact['numar']; ?></td>
							<td><? echo $rowfact['cumparator']; ?></td>
							<td><? echo $rowfact['nr_inmat']; ?></td>
							<td><? echo $rowfact['data']; ?></td>
							<td><a class="buton" target="_blank" href="/documente/factura_simpla.php?id_factura=<?echo $rowfact['id'];?>&exFurnizor=1" onclick="window.open('/documente/factura_simpla.php?id_factura=<?echo $rowfact['id'];?>&exClient=2','newwin');">Listeaza</a></td>
						</tr>
						
						<? endwhile; ?>
					</table>
					
				</div>
			</div>
		</div>
	</body>
</html>